class a {
    constructor(data) {
        this.data = data;
        this.next = null;
    }
}
 
class c {
    constructor() {
        this.head = null;
        this.tail = null;
        this.length = 0;
    }

    push(data) {
        const newNode = new a(data);

        if (!this.head) {
            this.head = newNode;
            this.tail = newNode;
            console.log(this.tail, 4434);

        } else {
            this.tail.next = newNode;
            console.log(this.tail, 444);
            this.tail = newNode;
        }

        this.length++;
    }
}
const ww = new c();
ww.push('hyl');
ww.push('hyls');
ww.push('hyls6');

console.log(ww);



// 对象是引用传递值，并不是值传递
// const b = new a();
// const w = 123
// b.name = w;
// console.log(b.name);
const sss = { 's': 1, 'w': 5 };
console.log(Object.values(sss));



const set = new Set();
set.add(1);
console.log(set.values());
console.log(set.has(1));
console.log(set.size);